//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================
#include <aura.h>

typedef Aura_Bool (*test_func_ptr)();

struct test_case
{
    char * test_name;
    test_func_ptr test_func;
};

Aura_Bool AuraTest_VritualMemoryAlloc();
Aura_Bool AuraTest_Test2();
Aura_Bool AuraTest_Test3();
Aura_Bool AuraTest_Test4();

struct test_case test_case[] =
{
    {"AuraTest_VritualMemoryAlloc",   AuraTest_VritualMemoryAlloc },
    {"AuraTest_Test2"             ,   AuraTest_Test2              },
    {"AuraTest_Test3"             ,   AuraTest_Test3              },
    {"AuraTest_Test4"             ,   AuraTest_Test4              },
    {AURA_NULL                    ,   AURA_NULL                   }
};

int  test_initialize()
{
    return 0;
}

void test_destroy()
{
    return ;
}

int main(void)
{
    int res = 0;

    res = test_initialize();
    if (res < 0) {
        Aura_printf(" <virtual Memory> failed to initialize.\n");
        return -1;
    }
    Aura_printf(" <virtual Memory> test starting ......\n");
    for (int i = 0; test_case[i].test_func != AURA_NULL; i++) {
        Aura_printf(" <<<%s>>> ----ENTER ----!\n",test_case[i].test_name);
        if (test_case[i].test_func()) {
            Aura_printf(" <<<%s>>> ----PASSED ----!\n",test_case[i].test_name);
        }
        else {
            Aura_printf(" <<<%s>>> ----AURA_FAILED ----!\n",test_case[i].test_name);
            return -1;
        }
    }
    Aura_printf(" <virtual Memory> test ended .........\n\n\n");
    return 0;
}

